package com.fresh.dao;

import java.util.List;

import com.fresh.dao.BaseDao;
import com.fresh.entity.UserEntity;

/**
 * 用户
 * 
 * @author alex
 * @email gaonan.service@gmail.com
 * @date 2017-03-23 15:22:06
 */
public interface UserDao extends BaseDao<UserEntity> {

	/**  
	* @Title: queryByMobile  
	* @Description: TODO 
	* @param @param mobile
	* @return UserEntity  
	* @throws  
	*/ 
	public UserEntity queryByMobile(String mobile);

	/**  
	* @Title: queryObject  
	* @Description: 根据用户名和密码查询用户
	* @param name
	* @param pwd
	* @return UserEntity  
	* @throws  
	*/ 
	public UserEntity queryObject(String name, String pwd);
	
	/**  
	* @Title: updateUser  
	* @Description: 编辑修改用户
	* @param userEntity
	* @param @return
	* @return int  
	* @throws  
	*/ 
	public int  updateUser(UserEntity userEntity);
	
	/**  
	* @Title: updateUser  
	* @Description: 删除用户
	* @param userEntity
	* @return int  
	* @throws  
	*/ 
	public void delete(String id);
	
	/**  
	* @Title: updateUser  
	* @Description: 新增用户
	* @param userEntity
	* @return int  
	* @throws  
	*/ 
	public int save(UserEntity userEntity);

	/**  
	* @Title: queryList  
	* @Description: 根据id查询用户
	* @param id
	* @return List<UserEntity>  
	* @throws  
	*/ 
	public List<UserEntity> queryList(UserEntity id);

	
	/**  
	* @Title: findById  
	* @Description: TODO 
	* @param @param 根据id查询用户
	* @param @return
	* @return UserEntity  
	* @throws  
	*/ 
	public UserEntity  findById(String id);

	/**  
	* @Title: deleteUser  
	* @Description: 根据id删除用户 
	* @param  id
	* @return void  
	* @throws  
	*/ 
	public void deleteUser(String id );

	/**
	 * @param 根据商户编号得到员工信息
	 * @param gmc
	 * @param shopId 
	 * @return
	 */
	public List<UserEntity> queryListByShopId(String shopId);
	
	
	/**
	 * @param 根据员工编号得到员工信息
	 * @param gmc
	 * @param shopId 
	 * @return
	 */
	public UserEntity queryById(String id);
	
	
	/**
	 * @param 删除
	 * @param gmc
	 * @param Id 
	 * @return
	 */
	public Boolean updateUserById(String id);

	/**  
	* @Title: findByType  
	* @Description: 根据商户id查询用户
	* @param @param shopId
	* @param @return
	* @return UserEntity  
	* @throws  
	*/ 
	public UserEntity findByType(String shopId);

	/**  
	* @Title: queryUserPage  
	* @Description: 分页查询用户 
	* @param i
	* @param size
	* @param shopId
	* @return List<UserEntity>  
	* @throws  
	*/ 
	public List<UserEntity> queryUserPage(int i, int size, String shopId);

	/**  
	* @Title: queryUserCount  
	* @Description: 根据商户id查询用户总数
	* @param shopId
	* @return int  
	* @throws  
	*/ 
	public int queryUserCount(String shopId);

	/**  
	* @Title: indByName
	* @Description: 根据姓名查询用户
	* @param name
	* @return List<UserEntity>
	* @throws  
	*/ 
	public List<UserEntity>findByName(String name);
	
	
	
	public Boolean updateUserByUserIdAndPwd(String id,String pwd);
}
